import matplotlib.pyplot as plt
from matplotlib import rcParams

# 设置字体
rcParams['font.sans-serif'] = ['Microsoft YaHei', 'SimHei', 'Arial Unicode MS', 'sans-serif']
rcParams['axes.unicode_minus'] = False  # 解决负号显示问题

def draw_test_results_chart():
    categories = ['功能完整性', '性能指标']
    results = [95, 90]  # 假设的测试结果百分比

    plt.bar(categories, results, color=['skyblue', 'lightgreen'])
    plt.ylim(0, 100)
    plt.ylabel('百分比')
    plt.title('测试结果汇总')
    plt.savefig('test_results_chart.png')
    plt.show()

if __name__ == "__main__":
    draw_test_results_chart() 